<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let newDate = (new Date('2023-4-5').getTime())
    console.log(newDate)
    let newD1 = new Date(newDate)
    console.log(newD1)
    let endDate = (new Date('2023-4-5').getTime())
    console.log(endDate)
    let endD1 = new Date(endDate)
    console.log(endD1)
    console.log(newD1 == endD1)
    console.log(newDate === endDate)
  </script>
</body>

</html>